package icu.sehnen.service.impl;

import icu.sehnen.mapper.NavMapper;
import icu.sehnen.model.NavModel;
import icu.sehnen.service.NavService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class NavServiceImpl implements NavService {
    @Autowired
    NavMapper navMapper;
    @Override
    public List<NavModel> findAll() {
     return    navMapper.findAll();
    }

    @Override
    public void add(NavModel navModel) {
      navMapper.add(navModel);
    }

    @Override
    public void updateNav(NavModel navModel) {
             navMapper.update(navModel);
    }

    @Override
    public NavModel findNavById(Long id) {
        return navMapper.findNavById(id);
    }

    @Override
    public void delete(Long id) {
        navMapper.delete(id);
    }
}
